feat(glass): P6 slice 1 — authoritative incident posture - #118
Conversation
Replace the critical/high event-burst auto-trigger with a pure, tested composition over facts the existing controllers already own. One prioritized incident (receipt integrity, runtime-host fault/recovery, delegation recovery, connection failure, core/plugin breakers, then failed/partial work explicitly needing the owner) renders as a single plain-language shell band with one walk-there action to the exact stable room; calm clears without a click, unknown sources are never labeled healthy, and the operator toggle stays a same-cause override. The Office controller latches receipt.integrity_failed from the one durable stream, identity-bound to the gateway. Burst helpers, tick timers, and dead cooldown knobs are removed; the live-feed spec now proves event volume and severity copy never flip incident mode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Hostile QA correction pushed at \97d18dd\ (single correction commit; no manual CodeRabbit re-review request).\n\nCorrections:\n- bootstrap the authoritative Office summary/stop-all facts cross-floor without marking unseen content displayed\n- bind summary, stop-all, receipt-integrity state, pending reads, acknowledgements, websocket ownership, and resume cursor to same-URL credential generation\n- reject late prior-identity responses and resume replacement credentials from cursor 0\n- discover receipt quarantine from production's exact 500 \�xecass.v1.receipt_integrity_quarantined\ response, force a post-event verification if a pre-event read was in flight, and clear only after a later authoritative summary succeeds\n- strengthen browser proof for Checking/Calm, integrity recovery, unavailable destination, 390px vertical/center-hit geometry, computed reduced motion, exact expected error accounting, and clean evidence captures\n\nFinal-byte local proof:\n- typecheck PASS\n- lint PASS (0 warnings)\n- unit 812/812 PASS\n- build PASS\n- core E2E 46/46 PASS (6.8m)\n- ExecAss contract validator PASS; validator tests 20/20 PASS\n- git diff --check PASS; mixed-EOL App diff is exactly +2 lines\n- eight unique nonzero desktop/390 evidence screenshots inspected |
P6 slice 1 — authoritative incident posture
Replaces the generic critical/high event-burst incident auto-trigger with a pure, tested composition over facts the existing controllers already own, and renders one calm/incident posture model in the Glass shell.
What changed
src/glass/incidentPosture.ts—composeIncidentPostureaccepts only already-authoritative loaded/unknown facts and returnscalm,unknown, or exactly one prioritized incident with plain copy, an authoritative detail line, a stable dedupecauseKey, and one stable-room target. Priority: receipt integrity → runtime-host fault/recovery → delegation recovery → gateway connection failure → open core breakers → faulted plugins → failed/partial work whose projection explicitly needs the owner. No events, no severity copy, no clocks, no invented backend health.decideAutomaticIncidentMode+applyOperatorIncidentToggle: the operator toggle stays an explicit presentation override ("off" silences exactly the current causeKey; a new cause re-raises; "on" holds through calm), unknown holds the mode, calm clears it without a click, and one cause never announces twice.App.tsx— the 1-second tick interval, ws-degraded timers, high-burst counting, cooldown timestamps, and the critical-event hook inhandleGatewayEventare gone. AuseMemocomposes posture fromuseMissionControlController(gateway/jobs status, open core/plugin breakers), the connection controller's health/ws states, and the Office controller's summary/stop-all/integrity facts. One idempotent effect applies the pure decision.incident_auto_triggerkeeps its exact meaning: it gates automatic mode switching only.useExecassOfficeController— latchesexecass.v1.receipt.integrity_failedfrom the one durable stream asintegrityFailure(summary + sequence) beside the existing critical notice; the latch is identity-bound and clears when the gateway URL or token-configured boundary changes. No new controller, websocket, event store, or polling loop.AppShell— a quiet posture word (Calm / Checking / Incident, never color alone) beside the operator toggle, and one plain-language incident band under the topbar: beacon + "Incident" label, message, authoritative detail, and one "Go to " action resolved against the live elevator registry (an unavailable room renders an honest note, not a dead button). Band isrole="status" aria-live="polite", wraps at 390px, and inherits the global reduced-motion kill.lib/liveFeed.tsand the five burst/cooldown knobs inopsUxConfigsafety (their only consumer was the deleted trigger).fail_safe_on_config_error, recovery, and undo knobs are untouched.POST /api/v1/e2e/execass-eventthat injects a durable ExecAss event through the same broadcast path production events use.Explicit non-incidents (each unit-proven)
waiting_external, owner global stop/freeze, intentionally paused runtime (unless the host is actually faulted), scheduler idle or merely-due work, failed/partial delegations with no intervention fact, ordinary confirmation/clarification attention on healthy work, transient connecting/reconnecting states, and unloaded sources (postureunknown, never "healthy").Validation
npm run typecheckPASS ·npm run lintPASSnpm run test:unit -- --runPASS: 803/803 tests (82 files) — includes 38 new composer/policy truth-table tests, 2 new office-controller integrity-latch tests, 5 new AppShell band testsnpm run buildPASS@core @p6-incidentscenario (Checking→Calm truth, breaker trigger with auto mode + toast, keyboard-activated walk to the exact breaker in the Breakers room, same-cause operator override, authoritative auto-recovery without a click, higher-priority receipt-integrity cause arriving live through the one ExecAss stream from another floor with walk to the Office desk, 390px band/status geometry with non-overlap and no horizontal overflow, reduced-motion fresh sitting, zero console/page/request-failure/HTTP-error tolerance)live-feed.spec.tsburst test rewritten to the new truth: event volume and critical severity copy never flip incident mode; a real open-breaker fact still doesgenerate_execass_contract --check) PASS · independent validator PASS ·git diff --checkPASSruntime/qa/p6-incident-posture/and visually inspected (calm, breaker incident, recovered, integrity incident, 390px integrity, reduced-motion) at desktop and 390px🤖 Generated with Claude Code